package com.base.key.domain.bo;
import com.base.common.core.domain.BaseEntity;
import com.base.common.core.validate.AddGroup;
import com.base.common.core.validate.EditGroup;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;


/**
 * 密钥备用表业务对象 t_key_reserve
 *
 * @author base
 * @date 2023-10-17
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class TKeyReserveBo extends BaseEntity {

    /**
     * key
     */
    @NotBlank(message = "key不能为空", groups = { EditGroup.class })
    private String keyCode;

    /**
     * 密钥类型(1-AES256 2-定制算法)
     */
    @NotBlank(message = "密钥类型(1-AES256 2-定制算法)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String keyType;

    /**
     * 密钥长度(默认32字节)
     */
    @NotNull(message = "密钥长度(默认32字节)不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long keyLen;

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operator;

    /**
     *
     */
    @NotBlank(message = "不能为空", groups = { AddGroup.class, EditGroup.class })
    private String remark;

    /**
     * 密钥值
     */
    @NotBlank(message = "密钥值不能为空", groups = { AddGroup.class, EditGroup.class })
    private String keyValue;

    /**
     * 校验码
     */
    @NotBlank(message = "校验码不能为空", groups = { AddGroup.class, EditGroup.class })
    private String checkCode;

    /**
     * 密钥创建方式(1-自动 2-手动)
     */
    @NotBlank(message = "密钥创建方式(1-自动 2-手动)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String createStyle;

    /**
     * 密钥状态(1-备用)
     */
    @NotBlank(message = "密钥状态(1-备用)不能为空", groups = { AddGroup.class, EditGroup.class })
    private String status;


}
